<template>
  <div>大儿子</div>
  <div @click="handler($parent)">{{ aa }}</div>
</template>

<script setup name="child1">
import { ref, reactive, onMounted } from 'vue'
import $bus from '@/bus'

const data = reactive({
  form: {},
  son:''
})

const aa = ref(null)
const { form,son } = toRefs(data);

onMounted(() => {
  $bus.on('toBrother', (data) => {
    aa.value = data.son
    console.log('222', data.son)
  })
})

const handler = ($parent) => {
  $parent.money -= 10 
  console.log($parent)

}

</script>

<style lang='scss' scoped>

</style>